// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({    env: "dzc-aapp-0g1mx02g41e97626", }) // 使用当前云环境
const db = cloud.database()
const _ = db.command

// 云函数入口函数
exports.main = async (event, context) => {
    const wxContext = cloud.getWXContext()
    const openid = wxContext.OPENID

    const res = await db.collection('identity_verification').where({
        _openid: openid
    }).get()

    return res
}   